home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000133_icon-group-sender_Thu Nov 21 09:03:51 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id gALG3hM12630
  4.     for icon-group-addresses; Thu, 21 Nov 2002 09:03:43 -0700 (MST)
  5. Message-Id: <200211211603.gALG3hM12630@baskerville.CS.Arizona.EDU>
  6. X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f
  7. Subject: RE: tab in regex
  8. From: Steve Wampler <swampler@noao.edu>
  9. To: jsampson-indexer <jsampson@indexes.u-net.com>
  10. Cc: icon2002@OptOnLine.net, icon-group@cs.arizona.edu
  11. Date: 21 Nov 2002 06:57:35 -0800
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14.  
  15. On Wed, 2002-11-20 at 15:05, jsampson-indexer wrote:
  16.  
  17. > I know real Iconeers don't use regex's, but the program I am using takes
  18. > them as user input - being brief one-liners they are suitable for this. In
  19. > my case here I think mapping tabs to another character and then back again
  20. > is probably the best kludge. The program searches tab-delimited data files
  21. > so the tab char has to be distinguished from other white-space chars.
  22.  
  23. John,
  24.  
  25. I haven't been able to produce a problem with using tabs in REs.  For
  26. example:
  27. -----------------------------------------
  28. link regexp
  29.  
  30. procedure main(args)
  31.     pat := RePat("\t")
  32.     str := "now is the  time    " 
  33.     write(image(str))
  34.     str ? {
  35.         while write(tab(ReFind(pat))) do move(1)
  36.         }
  37. end
  38. -------------------------------------------
  39. works as expected, producing:
  40. -------------------------------------------
  41. "now\tis the\ttime\t"
  42. now
  43. is the
  44. time
  45. -------------------------------------------
  46.  
  47. Do you have a sample program that illustrates the problem
  48. you're having that you can share?  Perhaps it's really
  49. some other problem masquerading as a problem with tabs in
  50. regex's.
  51.  
  52. -Steve
  53. -- 
  54. Steve Wampler -- swampler@noao.edu
  55. Quantum materiae materietur marmota monax si marmota
  56.                     monax materiam possit materiari?
  57.